package org.example.server.controller;

import org.example.common.result.Result;
import org.example.pojo.envcontent.envContentCarouselData;
import org.example.pojo.envcontent.envContentCarouselDto;
import org.example.pojo.envcontent.envContentCarouselVo;
import org.example.server.sever.envContentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/envContent")
public class envContentController  {
    @Autowired
    private envContentService envContentService;
    @RequestMapping(value="/envContentCarouselData",method = RequestMethod.POST)
    public Result envContentCarouselData(@RequestBody envContentCarouselVo envContentCarouselvo) {
        envContentCarouselDto carouselData = envContentService.getCarouselData(envContentCarouselvo.getCurrentPage(), envContentCarouselvo.getPageSize());
        return Result.success(carouselData);
    }

}
